Carbon


GetPenState

Header: Quickdraw.h Carbon status: Supported

Determines the graphics pen’s location, size, pattern, and pattern mode.

void GetPenState (
    PenState *pnState
);
Parameter descriptions
pnState

On return, a pointer to a PenState structure holding information about the graphics pen. The GetPenState function saves the location, size, pattern, and pattern mode of the graphics pen for the current graphics port in this structure.

DISCUSSION

After changing the graphics pen as necessary, restore these pen states with the SetPenState function.

This pen-manipulation function uses the local coordinate system of the current graphics port. Remember that each graphics port has its own pen, the state of which is stored in several fields of its GrafPort or CGrafPort structure. If you draw in one graphics port, change to another, and return to the first, the pen for the first graphics port has the same state as when you left it.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)